Integrand size = 21, antiderivative size = 229 \[ \int \frac {\cos ^m(c+d x)}{(a+a \cos (c+d x))^2} \, dx=-\frac {2 (1-m) \cos ^{1+m}(c+d x) \sin (c+d x)}{3 a^2 d (1+\cos (c+d x))}-\frac {\cos ^{1+m}(c+d x) \sin (c+d x)}{3 d (a+a \cos (c+d x))^2}+\frac {(1-2 m) m \cos ^{1+m}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+m}{2},\frac {3+m}{2},\cos ^2(c+d x)\right ) \sin (c+d x)}{3 a^2 d (1+m) \sqrt {\sin ^2(c+d x)}}-\frac {2 (1-m) (1+m) \cos ^{2+m}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2+m}{2},\frac {4+m}{2},\cos ^2(c+d x)\right ) \sin (c+d x)}{3 a^2 d (2+m) \sqrt {\sin ^2(c+d x)}} \]
-2/3*(1-m)*cos(d*x+c)^(1+m)*sin(d*x+c)/a^2/d/(1+cos(d*x+c))-1/3*cos(d*x+c) ^(1+m)*sin(d*x+c)/d/(a+a*cos(d*x+c))^2+1/3*(1-2*m)*m*cos(d*x+c)^(1+m)*hype rgeom([1/2, 1/2+1/2*m],[3/2+1/2*m],cos(d*x+c)^2)*sin(d*x+c)/a^2/d/(1+m)/(s in(d*x+c)^2)^(1/2)-2/3*(1-m)*(1+m)*cos(d*x+c)^(2+m)*hypergeom([1/2, 1+1/2* m],[2+1/2*m],cos(d*x+c)^2)*sin(d*x+c)/a^2/d/(2+m)/(sin(d*x+c)^2)^(1/2)
Time = 1.94 (sec) , antiderivative size = 188, normalized size of antiderivative = 0.82 \[ \int \frac {\cos ^m(c+d x)}{(a+a \cos (c+d x))^2} \, dx=\frac {\cos ^{1+m}(c+d x) \csc (c+d x) \left (-\sin ^2(c+d x)-\frac {(1+\cos (c+d x)) \left (-2 (-1+m) (1+m) (2+m) \sin ^2(c+d x)-(1+\cos (c+d x)) \left ((1-2 m) m (2+m) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+m}{2},\frac {3+m}{2},\cos ^2(c+d x)\right )+2 (-1+m) (1+m)^2 \cos (c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2+m}{2},\frac {4+m}{2},\cos ^2(c+d x)\right )\right ) \sqrt {\sin ^2(c+d x)}\right )}{(1+m) (2+m)}\right )}{3 a^2 d (1+\cos (c+d x))^2} \]
(Cos[c + d*x]^(1 + m)*Csc[c + d*x]*(-Sin[c + d*x]^2 - ((1 + Cos[c + d*x])* (-2*(-1 + m)*(1 + m)*(2 + m)*Sin[c + d*x]^2 - (1 + Cos[c + d*x])*((1 - 2*m )*m*(2 + m)*Hypergeometric2F1[1/2, (1 + m)/2, (3 + m)/2, Cos[c + d*x]^2] + 2*(-1 + m)*(1 + m)^2*Cos[c + d*x]*Hypergeometric2F1[1/2, (2 + m)/2, (4 + m)/2, Cos[c + d*x]^2])*Sqrt[Sin[c + d*x]^2]))/((1 + m)*(2 + m))))/(3*a^2*d *(1 + Cos[c + d*x])^2)
Time = 0.77 (sec) , antiderivative size = 234, normalized size of antiderivative = 1.02, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3042, 3245, 3042, 3457, 25, 3042, 3227, 3042, 3122}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos ^m(c+d x)}{(a \cos (c+d x)+a)^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )^m}{\left (a \sin \left (c+d x+\frac {\pi }{2}\right )+a\right )^2}dx\) |
\(\Big \downarrow \) 3245 |
\(\displaystyle \frac {\int \frac {\cos ^m(c+d x) (a (2-m)+a m \cos (c+d x))}{\cos (c+d x) a+a}dx}{3 a^2}-\frac {\sin (c+d x) \cos ^{m+1}(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )^m \left (a (2-m)+a m \sin \left (c+d x+\frac {\pi }{2}\right )\right )}{\sin \left (c+d x+\frac {\pi }{2}\right ) a+a}dx}{3 a^2}-\frac {\sin (c+d x) \cos ^{m+1}(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3457 |
\(\displaystyle \frac {\frac {\int -\cos ^m(c+d x) \left (a^2 (1-2 m) m-2 a^2 (1-m) (m+1) \cos (c+d x)\right )dx}{a^2}-\frac {2 (1-m) \sin (c+d x) \cos ^{m+1}(c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {\sin (c+d x) \cos ^{m+1}(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {-\frac {\int \cos ^m(c+d x) \left (a^2 (1-2 m) m-2 a^2 (1-m) (m+1) \cos (c+d x)\right )dx}{a^2}-\frac {2 (1-m) \sin (c+d x) \cos ^{m+1}(c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {\sin (c+d x) \cos ^{m+1}(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {-\frac {\int \sin \left (c+d x+\frac {\pi }{2}\right )^m \left (a^2 (1-2 m) m-2 a^2 (1-m) (m+1) \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx}{a^2}-\frac {2 (1-m) \sin (c+d x) \cos ^{m+1}(c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {\sin (c+d x) \cos ^{m+1}(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle \frac {-\frac {a^2 (1-2 m) m \int \cos ^m(c+d x)dx-2 a^2 (1-m) (m+1) \int \cos ^{m+1}(c+d x)dx}{a^2}-\frac {2 (1-m) \sin (c+d x) \cos ^{m+1}(c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {\sin (c+d x) \cos ^{m+1}(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {-\frac {a^2 (1-2 m) m \int \sin \left (c+d x+\frac {\pi }{2}\right )^mdx-2 a^2 (1-m) (m+1) \int \sin \left (c+d x+\frac {\pi }{2}\right )^{m+1}dx}{a^2}-\frac {2 (1-m) \sin (c+d x) \cos ^{m+1}(c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {\sin (c+d x) \cos ^{m+1}(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3122 |
\(\displaystyle \frac {-\frac {\frac {2 a^2 (1-m) (m+1) \sin (c+d x) \cos ^{m+2}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {m+2}{2},\frac {m+4}{2},\cos ^2(c+d x)\right )}{d (m+2) \sqrt {\sin ^2(c+d x)}}-\frac {a^2 (1-2 m) m \sin (c+d x) \cos ^{m+1}(c+d x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {m+1}{2},\frac {m+3}{2},\cos ^2(c+d x)\right )}{d (m+1) \sqrt {\sin ^2(c+d x)}}}{a^2}-\frac {2 (1-m) \sin (c+d x) \cos ^{m+1}(c+d x)}{d (\cos (c+d x)+1)}}{3 a^2}-\frac {\sin (c+d x) \cos ^{m+1}(c+d x)}{3 d (a \cos (c+d x)+a)^2}\) |
-1/3*(Cos[c + d*x]^(1 + m)*Sin[c + d*x])/(d*(a + a*Cos[c + d*x])^2) + ((-2 *(1 - m)*Cos[c + d*x]^(1 + m)*Sin[c + d*x])/(d*(1 + Cos[c + d*x])) - (-((a ^2*(1 - 2*m)*m*Cos[c + d*x]^(1 + m)*Hypergeometric2F1[1/2, (1 + m)/2, (3 + m)/2, Cos[c + d*x]^2]*Sin[c + d*x])/(d*(1 + m)*Sqrt[Sin[c + d*x]^2])) + ( 2*a^2*(1 - m)*(1 + m)*Cos[c + d*x]^(2 + m)*Hypergeometric2F1[1/2, (2 + m)/ 2, (4 + m)/2, Cos[c + d*x]^2]*Sin[c + d*x])/(d*(2 + m)*Sqrt[Sin[c + d*x]^2 ]))/a^2)/(3*a^2)
3.5.2.3.1 Defintions of rubi rules used
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*(( b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1)*Sqrt[Cos[c + d*x]^2]))*Hypergeometric2 F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2], x] /; FreeQ[{b, c, d, n}, x] && !IntegerQ[2*n]
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[b^2*Cos[e + f*x]*(a + b*Sin[e + f*x])^ m*((c + d*Sin[e + f*x])^(n + 1)/(a*f*(2*m + 1)*(b*c - a*d))), x] + Simp[1/( a*(2*m + 1)*(b*c - a*d)) Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[b*c*(m + 1) - a*d*(2*m + n + 2) + b*d*(m + n + 2)*Sin[e + f*x] , x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && EqQ [a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[m, -1] && !GtQ[n, 0] && (Intege rsQ[2*m, 2*n] || (IntegerQ[m] && EqQ[c, 0]))
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[b*(A*b - a*B)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^( n + 1)/(a*f*(2*m + 1)*(b*c - a*d))), x] + Simp[1/(a*(2*m + 1)*(b*c - a*d)) Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[B*(a*c*m + b *d*(n + 1)) + A*(b*c*(m + 1) - a*d*(2*m + n + 2)) + d*(A*b - a*B)*(m + n + 2)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ [b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[m, -2^(-1)] && !GtQ[n, 0] && IntegerQ[2*m] && (IntegerQ[2*n] || EqQ[c, 0])
\[\int \frac {\cos ^{m}\left (d x +c \right )}{\left (a +\cos \left (d x +c \right ) a \right )^{2}}d x\]
\[ \int \frac {\cos ^m(c+d x)}{(a+a \cos (c+d x))^2} \, dx=\int { \frac {\cos \left (d x + c\right )^{m}}{{\left (a \cos \left (d x + c\right ) + a\right )}^{2}} \,d x } \]
\[ \int \frac {\cos ^m(c+d x)}{(a+a \cos (c+d x))^2} \, dx=\frac {\int \frac {\cos ^{m}{\left (c + d x \right )}}{\cos ^{2}{\left (c + d x \right )} + 2 \cos {\left (c + d x \right )} + 1}\, dx}{a^{2}} \]
\[ \int \frac {\cos ^m(c+d x)}{(a+a \cos (c+d x))^2} \, dx=\int { \frac {\cos \left (d x + c\right )^{m}}{{\left (a \cos \left (d x + c\right ) + a\right )}^{2}} \,d x } \]
Exception generated. \[ \int \frac {\cos ^m(c+d x)}{(a+a \cos (c+d x))^2} \, dx=\text {Exception raised: TypeError} \]
Exception raised: TypeError >> an error occurred running a Giac command:IN PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Unable to divide, perhaps due to ro unding error%%%{1,[0,1,2,0]%%%}+%%%{1,[0,1,0,0]%%%} / %%%{4,[0,0,0,2]%%%} Error: Ba
Timed out. \[ \int \frac {\cos ^m(c+d x)}{(a+a \cos (c+d x))^2} \, dx=\int \frac {{\cos \left (c+d\,x\right )}^m}{{\left (a+a\,\cos \left (c+d\,x\right )\right )}^2} \,d x \]